package tv.shsun;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @Autowired
    private Remoting2SDK demoModule;

    @Autowired
    SSHConsumer sshConsumer;
    @Autowired
    SCWConsumer scwConsumer;

    @GetMapping("/")
    public String demo() {
        StringBuffer buffer = new StringBuffer(demoModule.exeModuleMethod());
        buffer.append("\n");
        buffer.append(sshConsumer.go(Integer.valueOf(88)));
        buffer.append("\n");
        buffer.append(scwConsumer.go("i-am-孙崇文"));

        return buffer.toString();
    }
}
